- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.5k
 
BUG: Use remove_orphans in compress_identical_objects #3310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Issue py-pdf#3306: PdfWriter.compress_identical_objects ignored remove_orphans. Correct for this. Also deprecate_with_replacement remove_orphans to remove_unreferenced.
          Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@           Coverage Diff           @@
##             main    #3310   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files          53       53           
  Lines        9029     9033    +4     
  Branches     1674     1676    +2     
=======================================
+ Hits         8732     8736    +4     
  Misses        177      177           
  Partials      120      120           ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
| remove_unreferenced: Remove unreferenced objects. | ||
| """ | ||
| deprecate_with_replacement( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This deprecation does not work and will always trigger - even without using the old parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename_kwargs should be used instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this works with positional arguments as well, yes. Otherwise, we would have to think of another approach like setting a object() constant as default for the deprecated parameter to be able to identify it correctly.
Issue #3306: PdfWriter.compress_identical_objects ignored remove_orphans. Correct for this. Also deprecate_with_replacement remove_orphans to remove_unreferenced.